#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
# @FileName  :database.py
# @Time      :2022/8/12 01:34
# @Author    :Toliong toliong@foxmail.com
"""
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker


SQLALCHEMY_DATABASE_URL = "sqlite:///./sql_example.db"

engine = create_engine(SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False})  # connect_args arg后面有s

SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)

Base = declarative_base()